<?php
/**
 * https://gitee.com/Mao02
 * http://www.dazhetu.cn/
 * jay_fun 410136330@qq.com
 * Date: 2018/11/9 0009
 * Time: 下午 10:20
 */

namespace app\admin\controller\content;

use app\common\controller\BasicAdmin;
use think\facade\Request;

/**
 * @title 文章评论管理
 * Class Reply
 * @package app\admin\controller
 */
class Reply extends BasicAdmin
{
    protected $table = 'content_article_reply';
    /**
     * @title 列表页
     */
    public function index()
    {
        return $this->_list();
    }

    /**
     * @title 禁用/启用操作
     * @throws PDOException
     * @throws \think\Exception
     */
    public function change()
    {
        $id = Request::post('id');
        $state = Request::post('state');
        $this->_change($id, ['state' => $state]);
    }


    /**
     * @title 删除
     * @throws PDOException
     * @throws \think\Exception
     */
    public function del()
    {
        $ids = Request::post('ids');
        $this->_del($ids);
    }
}